package org.example.practiceexamples;

import lombok.RequiredArgsConstructor;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;

public class PasswordEncodingExample {


    public static void main(String[] args) {
        // 创建 BCryptPasswordEncoder 实例
        BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();

        // 加密字符串 "1000"
        String encodedPassword = passwordEncoder.encode("2000000000");

        // 打印加密后的密码
        System.out.println(encodedPassword);
    }
}
